package com.zpark.aspectj;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @PackageName: com.zpark.aspectj
 * @ClassName: Man
 * @Description:
 * @author: RZS
 * @date: 2023/3/30  14:58
 */
@Component
public class Man {
    @Value("中关村")
    private String uname;

    @Value("2023")
    private Integer number;

    public String getUname() {
        return uname;
    }

    public void setUname(String uname) {
        this.uname = uname;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public int manToStr(){
        System.out.println("执行manToStr");
        System.out.println(this.getUname() + " --- " + this.getNumber());
        return 2023;
    }

    public void error(){
        System.out.println("程序执行出错");
        throw new RuntimeException();
    }
}
